<%@ page import="weblicitacao.Empenho" %>



<div class="fieldcontain ${hasErrors(bean: empenhoInstance, field: 'numero', 'error')} ">
	<label for="numero">
		<g:message code="empenho.numero.label" default="Numero" />
		
	</label>
	<g:textField name="numero" value="${empenhoInstance?.numero}"/>
</div>

<div class="fieldcontain ${hasErrors(bean: empenhoInstance, field: 'data', 'error')} required">
	<label for="data">
		<g:message code="empenho.data.label" default="Data" />
		<span class="required-indicator">*</span>
	</label>
	<g:datePicker name="data" format="dd/MM/yyyy hh:mm" precision="day"  value="${empenhoInstance?.data}"  />
</div>

<div class="fieldcontain ${hasErrors(bean: empenhoInstance, field: 'licitacao', 'error')} required">
	<label for="licitacao">
		<g:message code="empenho.licitacao.label" default="Licitacao" />
		<span class="required-indicator">*</span>
	</label>
	<g:select id="licitacao" name="licitacao.id" from="${weblicitacao.Licitacao.list()}" optionKey="id" required="" value="${empenhoInstance?.licitacao?.id}" class="many-to-one"/>
</div>

<div class="fieldcontain ${hasErrors(bean: empenhoInstance, field: 'itensEmpenho', 'error')} ">
	<label for="itensEmpenho">
		<g:message code="empenho.itensEmpenho.label" default="Itens Empenho" />
		
	</label>
	
<ul class="one-to-many">
<g:each in="${empenhoInstance?.itensEmpenho?}" var="i">
    <li><g:link controller="itemEmpenho" action="show" id="${i.id}">${i?.encodeAsHTML()}</g:link></li>
</g:each>
<li class="add">
<g:link controller="itemEmpenho" action="create" params="['empenho.id': empenhoInstance?.id]">${message(code: 'default.add.label', args: [message(code: 'itemEmpenho.label', default: 'ItemEmpenho')])}</g:link>
</li>
</ul>

</div>

